<?php
    /*
	   Model模型的编写
    */
	namespace App;

	use Illuminate\Database\Eloquent\Model;

	class Student extends Model{	

		protected $table = 'student_info';
		protected $primaryKey = 'id';

		public $timestamps = false;

		protected function getDateFormat(){
			return time();
		}

		protected function asDateTime($val){
			return $val;
		}

		protected $fillable = ['name','age','sex'];


		static function getStudentInfo(){
			//return 'Student name is waittingWang!';

			//操作数据库
			//$row = DB::table('student_info')->get();
			//return $row;
			
		}
	}

?>